//
//  UINavigationController+Autorotate.m
//  Flysurvey
//
//  Created by fenggeqiang on 14-10-27.
//  Copyright (c) 2014年 zhongyan. All rights reserved.
//

#import "UINavigationController+Autorotate.h"

@implementation UINavigationController (Autorotate)


- (BOOL)shouldAutorotate {
    return [self.visibleViewController shouldAutorotate];
}

- (NSUInteger)supportedInterfaceOrientations {
    return [self.visibleViewController supportedInterfaceOrientations];
}

//-(BOOL)shouldAutorotate {
//    return [[self.viewControllers lastObject] shouldAutorotate];
//}
//
//- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
//    return [[self.viewControllers lastObject] preferredInterfaceOrientationForPresentation];
//}
//
//-(NSUInteger)supportedInterfaceOrientations{
//    return [[self.viewControllers lastObject] supportedInterfaceOrientations];
//}
//
//-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation{
//    return [[self.viewControllers lastObject] shouldAutorotateToInterfaceOrientation:toInterfaceOrientation];
//}
@end
